package com.icloud.system.boot.controller.internal;

import com.icloud.common.core.api.CommonResult;
import com.icloud.system.api.feign.AdminPermissionFeignClient;
import com.icloud.system.boot.service.AdminPermissionService;
import io.swagger.annotations.Api;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.Map;

@Controller
@Api(tags = "「内部」角色权限接口")
@RequestMapping("/internal/permission")
@RequiredArgsConstructor
public class InternalPermissionController implements AdminPermissionFeignClient {
    private final AdminPermissionService permissionService;


    /**
     * 获取角色权限
     * @return
     */
    @Override
    public CommonResult<Map<Object, Object>> getPermissionRolesMap() {
        return CommonResult.success(permissionService.getPermissionRolesMap());
    }
}
